//
//  AppManager.h
//  ImGuider
//
//  Created by llt on 2017/4/12.
//  Copyright © 2017年 imguider. All rights reserved.
//


/**
 设置语言
 
 - AppLanguageJan: 简体中文
 - AppLanguageFan: 繁体中文
 - AppLanguageFanXG: 繁体中文——香港
 - AppLanguageEng: 英文
 - AppLanguageJapanese: 日语
 - AppLanguageItaly: 意大利语
 */
typedef NS_ENUM(NSUInteger, AppLanguageType) {
    AppLanguageCNJan,
    AppLanguageCNFan,
    AppLanguageCNFanXG,
    AppLanguageEnglish,
    AppLanguageJapanese,
    AppLanguageItaliano
};


// 获取语言
#define MYLocalizedString(key, comment) \
[[AppManager sharedManager] get:(key) alter:(comment)]

#import <Foundation/Foundation.h>
#import "AFNetworkReachabilityManager.h"
#import "VersionModel.h"
#import "City.h"
#import "Message.h"
#import "TranslationModel.h"
#import "LanguageModel.h"
#import "SearchResultModel.h"
@class MainViewController;

@interface AppManager : NSObject


+ (instancetype)sharedManager;

@property (nonatomic, copy) NSString *baseURLStr;

@property (nonatomic, strong) VersionModel *version;

@property (nonatomic, copy) NSString *cityver, *countryver;

@property (nonatomic, strong) NSDictionary *recomendParams;

@property (nonatomic) NSString *currencyCode;

@property (nonatomic, strong) City *lastCity;

//播放页面 参数
@property (nonatomic, copy)NSString *lineid;

@property (nonatomic) AFNetworkReachabilityStatus networkState;

- (void)setupLanguageType;
@property (nonatomic) AppLanguageType language;
@property (nonatomic) NSString *lanstr;

@property (nonatomic, copy)NSString *currentPointID;

@property (nonatomic) BOOL allowWhenPlay; // 播放时不询问
@property (nonatomic) BOOL allowWhenDownload;// 下载时不询问
@property (nonatomic) BOOL isOffReceiverWhenListen;// 自动切换听筒模式
@property (nonatomic) BOOL allPlayWhenListen;// 连续播放
@property (nonatomic) BOOL automaticPlay;//自动播放



@property (nonatomic,strong)NSMutableArray * translationArray;//用于存储翻译记录
@property (nonatomic,strong)LanguageModel * languageLeft;//记录左边语言
@property (nonatomic,strong)LanguageModel * languageRight;//记录右边语言
@property (nonatomic,strong)NSArray * recentLanguages;//记录常用语言 最多五个
@property (nonatomic,strong)NSMutableArray * searchResultArray;//用于存储搜索记录 最近十条记录

@property (nonatomic,strong)NSMutableArray <City *>* recommendArray;//热门推荐记录

//@property (nonatomic,strong) NSArray * countryList;//按国家分组显示各个城市  避免改原来数据库逻辑   存成沙盒结构
//@property (nonatomic) BOOL isCNY;// 是否显示人民币


- (NSString *)get:(NSString *)key alter:(NSString *)alternate;

@property (nonatomic, weak) MainViewController *manVC;

@property (nonatomic, strong) Message *pushObj;

@property (nonatomic) BOOL hasTicket;

@end
